import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import java.sql.Blob;
import java.sql.SQLException;


public class Film implements Serializable {

	private String filmtitel;
	private int filmnr;
	private int dauer=90; //in Minuten
	private String genere;
	private String beschreibung;
	private double preis1;
	private double preis2=preis1+1;
	private double preis3=preis2+1;
	private int fsk;
	
	public Film (String filmtitel, double preis1){
		this.filmtitel = filmtitel;
		this.preis1 = preis1;
	}
	
	public Film (String filmtitel, int dauer, String genere, double preis1, String beschreibung){
		this.filmtitel = filmtitel;
		this.dauer=dauer;
		this.genere=genere;
		this.preis1 = preis1;
		this.beschreibung=beschreibung;
	}
	
	public Film (String titel, int dauer, String genre, double preis){
		this.filmtitel = titel;
		this.dauer = dauer;
		this.genere = genre;
		this. preis1=preis;
	}
	
	public Film(int filmnr, String filmtitel, int dauer, String genere, String beschreibung, double preis1, int fsk){
		this.filmnr = filmnr;
		this.filmtitel = filmtitel;
		this.dauer = dauer;
		this.genere = genere;
		this.beschreibung = beschreibung;
		this. preis1=preis1;
		preis2 = preis1+1;
		this.fsk = fsk;
	}
	public Film(int filmnr, String filmtitel, int dauer, String genere, String beschreibung, double preis1, double preis2, int fsk){
		this.filmnr = filmnr;
		this.filmtitel = filmtitel;
		this.dauer = dauer;
		this.genere = genere;
		this.beschreibung = beschreibung;
		this. preis1=preis1;
		this. preis2=preis2;
		this.fsk = fsk;
	}

	public Film() {
	}
	
	public void setFSK (int fsk){
		this.fsk=fsk;
	}
	
	public int getFSK (){
		return fsk;
	}

	public String getFilmtitel() {
		return filmtitel;
	}

	public void setFilmtitel(String filmtitel) {
		this.filmtitel = filmtitel;
	}

	public int getFilmnr() {
		return filmnr;
	}

	public void setFilmnr(int filmnr) {
		this.filmnr = filmnr;
	}

	public int getDauer() {
		return dauer;
	}

	public void setDauer(int dauer) {
		this.dauer = dauer;
	}

	public String getGenere() {
		return genere;
	}

	public void setGenere(String genere) {
		this.genere = genere;
	}

	public String getBeschreibung() {
		return beschreibung;
	}

	public void setBeschreibung(String beschreibung) {
		this.beschreibung = beschreibung;
	}

	public double getPreis1() {
		return preis1;
	}

	public void setPreis1(double preis1) {
		this.preis1 = preis1;
	}

	public double getPreis2() {
		return preis2;
	}

	public void setPreis2(double preis2) {
		this.preis2 = preis2;
	}

	public double getPreis3() {
		return preis3;
	}

	public void setPreis3(double preis3) {
		this.preis3 = preis3;
	}

	public double getPreis(int typ) {
		switch(typ){
		case 1:return getPreis1();
		case 2:return getPreis2();
		case 3:return getPreis3();
		default: return 5.00;
		
		}
	
	}

	public int getID() {
		
		return filmnr;
	}

	@Override
	public void free() throws SQLException {
		// TODO Auto-generated method stub
		
	}

	@Override
	public InputStream getBinaryStream() throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public InputStream getBinaryStream(long arg0, long arg1)
			throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public byte[] getBytes(long arg0, int arg1) throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public long length() throws SQLException {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public long position(byte[] arg0, long arg1) throws SQLException {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public long position(Blob arg0, long arg1) throws SQLException {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public OutputStream setBinaryStream(long arg0) throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int setBytes(long arg0, byte[] arg1) throws SQLException {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int setBytes(long arg0, byte[] arg1, int arg2, int arg3)
			throws SQLException {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void truncate(long arg0) throws SQLException {
		// TODO Auto-generated method stub
		
	}
	
}
